home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Especial Multimedia
/
Especial Multimedia.iso
/
Multimed
/
Prg
/
WAVPLUS.ZIP
/
MIDIINFO.WD_
/
MIDIINFO.WD
Wrap
Text File
|
1997-09-14
|
4KB
|
155 lines
VERSION 2.00
Begin Form MidiInfo
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Midi Info"
ClientHeight = 1830
ClientLeft = 1095
ClientTop = 1485
ClientWidth = 4590
ControlBox = 0 'False
Height = 2235
Left = 1035
LinkTopic = "Form3"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1830
ScaleWidth = 4590
Top = 1140
Width = 4710
Begin Timer Timer1
Enabled = 0 'False
Interval = 50
Left = 4320
Top = 1620
End
Begin CommandButton CmdPlay
BackColor = &H00C0C0C0&
Caption = "&Play Midi"
Height = 375
Left = 240
TabIndex = 3
Top = 1260
Width = 2055
End
Begin CommandButton CmdOkay
BackColor = &H00C0C0C0&
Cancel = -1 'True
Caption = "O &K A Y"
Height = 375
Left = 2280
TabIndex = 0
Top = 1260
Width = 2055
End
Begin Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 195
Index = 1
Left = 2400
TabIndex = 4
Top = 720
Width = 1935
End
Begin Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 200
Index = 0
Left = 2400
TabIndex = 5
Top = 240
Width = 1935
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Length in milliseconds:"
Height = 195
Index = 1
Left = 240
TabIndex = 2
Top = 720
Width = 2055
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "File Name:"
Height = 200
Index = 0
Left = 240
TabIndex = 1
Top = 240
Width = 2055
End
End
Sub CmdOkay_Click ()
RetString$ = Space$(255)
MidiStop RetString$
RetString$ = Space$(255)
MidiClose RetString$
Unload Me
End Sub
Sub CmdPlay_Click ()
Answer$ = Space$(255)
MidiStatusMode Answer$
If Left$(Answer$, 7) = "playing" Then
RetString$ = Space$(255)
MidiClose RetString$
Timer1.Enabled = False
End If
TheFileName$ = FormPassString
RetString$ = Space$(255)
MidiOpen TheFileName$, RetString$
RetString$ = Space$(255)
MidiStart RetString$
Timer1.Enabled = True
End Sub
Sub Form_Load ()
FormCenterForm Me, WavPlay
TempName$ = FormPassString
RevString TempName$
pos% = InStr(TempName$, "\")
TempName$ = Left$(TempName$, pos% - 1)
RevString TempName$
Label2(0).Caption = UCase$(TempName$)
TheFileName$ = FormPassString
RetString$ = Space$(255)
MidiOpen TheFileName$, RetString$
RetString$ = Space$(255)
MidiStatusLengthMS RetString$
RetString$ = Format$(Val(RetString$), "###,###,##0")
Label2(1).Caption = RetString$
RetString$ = Space$(255)
MidiClose RetString$
Screen.MousePointer = 0
End Sub
Sub Form_Paint ()
DoForm3D Me, "raised", 2, 0
DoForm3D Me, "sunken", 2, 2
End Sub
Sub Timer1_Timer ()
Answer$ = Space$(255)
MidiStatusMode Answer$
If Left$(Answer$, 7) = "playing" Then Exit Sub
If Left$(Answer$, 7) = "stopped" Then
RetString$ = Space$(255)
MidiClose RetString$
Timer1.Enabled = False
End If
End Sub